<?php /*a:2:{s:73:"/www/wwwroot/afanda.ccpingtai.cn/application/manage/view/postage_add.html";i:1585357624;s:66:"/www/wwwroot/afanda.ccpingtai.cn/application/manage/view/base.html";i:1596192950;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
	<meta name="renderer" content="webkit">
<title>后台管理系统</title>
<link rel="stylesheet" href="/static/public/awesome/css/font-awesome.min.css" />

<link rel="stylesheet" href="/static/public/layui/css/layui.css" />

<link rel="stylesheet" href="/static/public/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="/static/manage/css/style.css" />

	<link rel="stylesheet" href="/static/public/dist/zoomify.min.css">
	
<script src="/static/public/kindeditor/kindeditor-all.js"></script>
<script src="/static/public/kindeditor/lang/zh_CN.js"></script>
<script src="/static/public/ueditor/ueditor.config.js?t=<?php echo time();?>"></script>
<script src="/static/public/ueditor/ueditor.all.min.js"></script>
<script src="/static/public/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
<?php if($is_auth): ?>


<div class="g-main">

    <div class="m-main-title">

        <div class="m-container-fluid">

            <a href="<?php echo url('index/welcome'); ?>"><i class="icon icon-home"></i>首页</a>

            <span class="icon-angle-right"></span>

            <span>商城</span>

            <span class="icon-angle-right"></span>

            <span>邮费管理</span>

            <span class="icon-angle-right"></span>

            <span><?php echo !empty($info) ? '编辑'  :  '添加'; ?>邮费模板</span>

            <a class="u-flush"><i class="icon-repeat"></i></a>

        </div>

    </div>

    <div class="m-main-content">

        <div class="m-container">

            <div class="m-form">

                <form class="layui-form" id="j_form">

                    <table class="m-table">

                        <thead>

                            <tr>

                                <th colspan="2"><?php echo !empty($info) ? '编辑'  :  '添加'; ?>邮费模板</th>

                            </tr>

                        </thead>

                        <tbody>

						<tr>
							<td width="15%"><label for="name">名称<em>*</em></label></td>
							<td><input type="text" class="u-ipt u-ipt-long" name="name" id="name" placeholder="请输入名称" value="<?php echo htmlentities($info['name']); ?>" /></td>
						</tr>
                            <tr>
                                <td width="15%"><label for="title">基础费用<em>*</em></label></td>
                                <td><input type="num" class="u-ipt u-ipt-long" name="postage_amount" id="postage_amount" placeholder="请输入邮费" value="<?php echo htmlentities($info['postage_amount']); ?>" /></td>
                            </tr>
                            <tr>
                                <td><label for="">类型<em>*</em></label></td>
                                <td>
                                    <div class="lay-select">
                                        <select id="type" name="type" lay-filter="type">
                                            <option  value="1" <?php if($info['type'] == 1): ?> selected<?php endif; ?>>固定收费</option>
                                            <option  value="2" <?php if($info['type'] == 2): ?> selected<?php endif; ?>>计重</option>
                                            <option  value="3" <?php if($info['type'] == 3): ?> selected<?php endif; ?>>计件</option>
                                            <option  value="4" <?php if($info['type'] == 4): ?> selected<?php endif; ?>>特殊地区</option>
                                        </select>
                                    </div>
                                </td>
                            </tr>
                            <tr id="sz">
                                <td><label for="url">首重<em>*</em></label></td>
                                <td><input type="text" class="u-ipt u-ipt-long" name="weight" id="weight" placeholder="重量" value="<?php echo htmlentities($info['weight']); ?>" /><span>kg</span></td>
                            </tr>
							<tr id="cz">
								<td><label for="url">超重费用<em>*</em></label></td>
								<td><input type="num" class="u-ipt u-ipt-long" name="weight_amount" id="weight_amount" placeholder="请输入金额" value="<?php echo htmlentities($info['weight_amount']); ?>" /><span>/kg</span></td>
							</tr>
							<tr>
								<td><label for="reduction_amount">包邮条件<em>*</em></label></td>
								<td><input type="num" class="u-ipt u-ipt-long" name="reduction_amount" id="reduction_amount" placeholder="请输入" value="<?php echo htmlentities($info['reduction_amount']); ?>" /><span>到达此金额将包邮,0元代表不包邮</span></td>
							</tr>
							<tr id="dq">
								<td width="15%"><label for="">地区选择</label></td>
								<td>
									<div class="privilege-item lay-checked clearfix" style="margin-bottom: 0px;padding:0;border-bottom:none">
										<dl class="clearfix" style="border-bottom:none" id="xuanzhongs">
											<dt><h3 class="lay-checkbox"><input type="checkbox" class="select_item_all" lay-skin="primary" title="全选" lay-filter="h3_privilege" /></h3></dt>
											<?php if(is_array($zoning) || $zoning instanceof \think\Collection || $zoning instanceof \think\Paginator): if( count($zoning)==0 ) : echo "" ;else: foreach($zoning as $key1=>$nav): ?>
											<dd class="lay-checkbox"><input type="checkbox" name="area[]" id="area" lay-skin="primary" title="<?php echo htmlentities($nav['region_name']); ?>" value="<?php echo htmlentities($nav['region_id']); ?>" <?php if(!empty($info['area']) && in_array($nav['region_id'], $info['area'])): ?> checked<?php endif; ?>/></dd>
											<?php endforeach; endif; else: echo "" ;endif; ?>
										</dl>
									</div>
								</td>
							</tr>

                            <tr>

                                <td><label for="list_order">排序</label></td>

                                <td><input type="text" class="u-ipt u-ipt-small" name="list_order" id="list_order" placeholder="请输入排序值" value="<?php echo !empty($info['list_order']) ? htmlentities($info['list_order']) : 0; ?>" /><span>值越大越排在前面</span></td>

                            </tr>

                        </tbody>

                    </table>

                    <div class="m-form-btn"><input type="hidden" name="id" value="<?php echo htmlentities($info['id']); ?>"><button id="j_btn" class="u-btn">确定提交</button></div>

                </form>

            </div>

        </div>

    </div>

</div>


<?php endif; ?>
<input type="hidden" name="action_uri" value="<?php echo url('action'); ?>" />

<input type="hidden" name="redirect_uri" value="<?php echo url('index'); ?>" />

<input type="hidden" name="region_uri" value="/manage/regions/regions" />
<script src="/static/public/js/jquery-1.10.2.js"></script>
<script src="/static/public/js/maniac.ui.js"></script>
<script src="/static/public/layui/layui.js" charset="utf-8"></script>
<script src="/static/public/js/aes.js"></script>
<script src="/static/public/js/mode-ecb-min.js"></script>
<script src="/static/public/js/utils.js"></script>
<script src="/static/public/js/dialog.js"></script>
<script src="/static/manage/js/form.js"></script>
<script src="/static/manage/js/js.js"></script>
<script src="/static/public/js/app.js"></script>
<script src="/static/public/js/encrypt.js"></script>
<script src="/static/public/dist/zoomify.min.js"></script>
<script type="text/javascript">
    $('.fdzoom').zoomify();
</script>

<script>
var aesKey = '<?php echo htmlentities($encrypt_key); ?>';
    $(function(){
        layui.use('layer', function(){
            var user_exists = parseInt('<?php echo !empty($user_exists) ? 1  :  0; ?>');
            var user_forbidden = parseInt('<?php echo !empty($user_forbidden) ? 1  :  0; ?>');
            var quit_force = parseInt('<?php echo !empty($quit_force) ? 1  :  0; ?>');
            var is_auth    = parseInt('<?php echo !empty($is_auth) ? 1  :  0; ?>');
            
            if (user_exists) {
                dialog.error('您所登录的用户已被删除', function(){
                	top.location.href = '/manage';
                    return false;
                });
            }
            
            if (user_forbidden) {
                dialog.error('您的账户已被禁用', function(){
                	top.location.href = '/manage';
                    return false;
                });
            }

            if (quit_force) {
                dialog.error('同一账户同一时间只能一人在线', function(){
                	top.location.href = '/manage';
                    return false;
                });
            }
            
            if (!is_auth) {
                dialog.error('您没有权限执行此操作', function(){
                    window.location.href = history.go(-1);
                    return false;
                });
            }
        });
    })
</script>

<script src="/static/public/js/jquery-ui.min.js"></script>
<script>
    $(function () {
        var keyValue;
        keyValue = $('#type :selected ').val();



        if (keyValue == 1) {
            $("#sz").hide();
            $("#cz").hide();
            $("#dq").hide();
        }
        if (keyValue == 2) {
            $("#sz").show();
            $("#cz").show();
            $("#dq").hide();
        }
        if (keyValue == 3) {
            $("#sz").hide();
            $("#cz").hide();
            $("#dq").hide();
        }
        if (keyValue == 4) {
            $("#sz").hide();
            $("#cz").hide();
            $("#dq").show();
        }

    })
    layui.use('form', function () {
        var form = layui.form;
        form.on('select(type)', function (data) {
            console.log(data);
            if (data.value == 1) {
                $("#sz").hide();
                $("#cz").hide();
                $("#dq").hide();
            }
            if (data.value  == 2) {
                $("#sz").show();
                $("#cz").show();
                $("#dq").hide();
            }
            if (data.value  == 3) {
                $("#sz").hide();
                $("#cz").hide();
                $("#dq").hide();
            }
            if (data.value  == 4) {
                $("#sz").hide();
                $("#cz").hide();
                $("#dq").show();
            }
            form.render();
        });

    });



</script>

</body>
</html>